package demo3;
class Student9 {
    private String name;
    private int age;
    //定义构造方法
    public Student9(String name,int age){
        name = name;
        age = age;
    }
    public String read() {
        return "我是:"+name+",年龄："+age;
    }
}
public class Example9 {
    public static void main(String[] args) {
        Student9 stu = new Student9("张三", 18);
        System.out.println(stu.read());
    }
}